	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">新增地址</h1>
	</header>
	<div class="mui-content" style="margin: 20px auto 0px auto;">
		<form class="mui-input-group">
			<div class="mui-input-row">
				<label>收货人</label>
				<input id='account' type="text" class="mui-input-clear mui-input">
			</div>
			<div class="mui-input-row">
				<label>联系电话</label>
				<input id='phone' type="text" class="mui-input-clear mui-input">
			</div>
			<div class="mui-input-row">
				<label>所在地</label>
				<input id='showCityPicker' type="text" class="mui-input-clear mui-input">
			</div>
			<div class="mui-input-row">
				<label>详细住址</label>
				<textarea id="address" rows="5"></textarea>
			</div>
			<div class="mui-input-row mui-checkbox">
				<label>设为默认地址</label>
				<input id="isDefault" type="checkbox" >
			</div>
		</form>
		<div class="mui-content-padded">
			<button class="mui-btn mui-btn-block mui-btn-primary" onclick="save()">保存</button>
		</div>
		<div class="mui-content-padded">
			<button class="mui-btn mui-btn-block mui-btn-grey" onclick="ajaxContent('/address/list')">取消</button>
		</div>
	</div>
<script>
function save(){
	var account=$("#account").val();
	var phone=$("#phone").val();
	var showCityPicker=$("#showCityPicker").val();
	var address=$("#address").val();
	var isDefault=$("#isDefault").val();
	if(account==""){
		mui.alert('请输入收货人');
			return false;
	}
	if(phone==""){
		mui.alert('请输入联系电话');
			return false;
	}
	if(showCityPicker==""){
		mui.alert('请输入所在地');
			return false;
	}
	if(address==""){
		mui.alert('请输入详细地址');
			return false;
	}
	var data={
			account:account,
			phone:phone,
			showCityPicker:showCityPicker,
			address:address,
			isDefault:isDefault
	};
	ajaxContent("/address/add/s", data);
}
</script>
